﻿namespace gisgeb.plugins.newsolution
{
    using System;

    public abstract class NewSolutionPlugin : interfaces.IMenuEntryPlugin
    {
        protected abstract string VersionAsNumeric { get; }

        protected abstract string VersionAsYear { get; }

        public int PositionHint
        {
            get
            {
                return 2;
            }
        }

        public string MenuDisplayText
        {
            get
            {
                return "New Component (" + this.VersionAsYear + ")";
            }
        }

        public string HelpText
        {
            get
            {
                return "Create a new Component as VS" + this.VersionAsYear + " Solution";
            }
        }

        public Action<string> Command
        {
            get
            {
                return s => (new NewSolutionCreator(this.VersionAsNumeric, this.VersionAsYear)).CreateComponentAt(s);
            }
        }
    }

    public class New2008ComponetPlugin : NewSolutionPlugin
    {
        protected override string VersionAsNumeric
        {
            get { return "10.00"; }
        }

        protected override string VersionAsYear
        {
            get { return "2008"; }
        }
    }

    public class New2010ComponetPlugin : NewSolutionPlugin
    {
        protected override string VersionAsNumeric
        {
            get { return "11.00"; }
        }

        protected override string VersionAsYear
        {
            get { return "2010"; }
        }
    }
}
